package com.hnu.seckill.controller;


import com.hnu.seckill.entity.TUser;
import com.hnu.seckill.rabbitmq.MQSender;
import com.hnu.seckill.vo.RespBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jobob
 * @since 2025-04-16
 */
@Controller
@RequestMapping("/user")
public class UserController {


    @Autowired
    private MQSender mqSender;

    /**
     * 用户信息测试
     * @param user
     * @return
     */
    @ResponseBody
    @RequestMapping("/info")
    public RespBean info(TUser user) {
        return RespBean.success(user);
    }

//    @RequestMapping("/mq")
//    @ResponseBody
//    public void mq() {
//        mqSender.sendMessage("hello");
//    }

}
